#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
    const char *filename = "./record.txt";
    int ret = truncate(filename, 100);
    if (ret == -1)
    {
        perror("truncate error:");
        exit(-1);
    }

    return 0;
}